package demo4.dao;

import org.springframework.stereotype.Component;

@Component
public class UserDAO implements IUserDAO{
    @Override
    public boolean finUserByName(String name) {
        //实际是链接数据库根据用户名查询用户信息
        System.out.println("UserDAO:根据用户名查询该用户信息");
        //true表示查询用户
        return Math.random()<0.5;
    }
}
